// funções baseadas nas funções de breakpoints do Bootstrap 4.
// https://github.com/twbs/bootstrap/blob/main/scss/mixins/_breakpoints.scss

@function verify_if_max_breakpoint($breakpoint_key, $breakpoints: $media_breakpoints) {
  $max: map-get($breakpoints, $breakpoint_key);

  @return if($max and $max > 0, $max - .02, null);
}

@function verify_if_min_breakpoint($breakpoint_key, $breakpoints: $media_breakpoints) {
  $min_breakpoint: map-get($breakpoints, $breakpoint_key);

  @return if($min_breakpoint != 0, $min_breakpoint, null);
}

@function generate_breakpoint_infix($breakpoint_key, $breakpoints: $media_breakpoints) {
  @return if(verify_if_min_breakpoint($breakpoint_key, $breakpoints) == null, "", "-#{$breakpoint_key}");
}
